<template>
  <img class="avatar-container" :src="url" alt="头像" :style="{
    width: width +'px',
    height: height +'px',
  }" />
</template>

<script>
export default {
  props: {
    url: {
      type: String,
      required: true
    },
    width:{
      type:Number,
      default: 150
    },
    height:{
      type:Number,
      default: 150
    }
  },
};
</script>

<style lang="less" scoped>
.avatar-container{
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
</style>